<template>
    <view>
        <u-cell-group :border="false">
            <u-cell-item v-for="(item,index) in menuMaster" :key="index" :title="item.title" :icon="item.icon" :border-bottom="menuMaster.length - 1 == index ? false : true" @click="gotoPage(item.url)"/>
        </u-cell-group>
        <u-cell-group :border="false">
            <u-cell-item v-for="(item,index) in menuSub" :key="index" :title="item.title" :icon="item.icon" :border-bottom="menuSub.length - 1 == index ? false : true" @click="gotoPage(item.url)"/>
        </u-cell-group>
    </view>
</template>
<script setup lang="ts">
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
let menuMaster = reactive([
    {title:'我的钱包', icon: proxy.$icon.mymember, url: '/packageA/wallet/index'},
    {title:'我的分会', icon: proxy.$icon.contactbranchpresident, url: '/packageA/branch/list'},
]);
let menuSub = reactive([
    {title:'我的钱包', icon: proxy.$icon.mymember, url: '/packageA/wallet/index'},
    {title:'活动管理', icon: proxy.$icon.contactbranchpresident, url: '/packageB/activity/examine'},
    {title:'会员管理', icon: proxy.$icon.contactbranchpresident, url: '/packageA/branch/member'},
]);
const gotoPage = (url) => {
    proxy.$util.gotoPage(url);
}
</script>